import 'package:flutter_nb_net/flutter_net.dart';

class UserInfoResp extends BaseNetModel {
  int? code;
  String? msg;
  UserInfoData? data;

  UserInfoResp({this.code, this.msg, this.data});

  @override
  fromJson(Map<String, dynamic> json) {
    return UserInfoResp(
      code: json['code'],
      msg: json['msg'],
      data: json['data'] == null ? null : UserInfoData().fromJson(json['data']),
    );
  }
}

class UserInfoData extends BaseNetModel {
  String? nickname;
  String? avatarUrl;
  String? type;
  int? deviceCount;
  String? phone;
  int? userId;
  int? imei;
  UserInfoData({this.nickname, this.avatarUrl, this.type, this.deviceCount, this.phone, this.userId,this.imei});

  @override
  fromJson(Map<dynamic, dynamic> json) {
    return UserInfoData(
      nickname: json['nickname'],
      avatarUrl: json['avatarUrl'],
      type: json['type'],
      deviceCount: json['deviceCount'],
      phone: json['phone'],
      userId: json['userId'],
      imei: json['imei'],

    );
  }

  Map<String, dynamic> toJson() {
    return {
      'nickname': nickname,
      'avatarUrl': avatarUrl,
      'type': type,
      'deviceCount': deviceCount,
      'phone': phone,
      'userId': userId,
      'imei': imei,

    };
  }
}